<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width"/>
    <meta name="author" content="www.lzqcode.com"/>
    <meta name="robots" content="all"/>
    <title>友链</title>
    <link rel="stylesheet" href="font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="../css/master.css"/>
    <link rel="stylesheet" href="../css/gloable.css"/>
    <link rel="stylesheet" href="../css/nprogress.css"/>
    <link rel="stylesheet" href="../css/about.css"/>
    <link rel="stylesheet" href="../lib/layui-v2.6.3/css/layui.css" media="all">
    <link rel="stylesheet" href="../lib/layui-v2.6.3/css/layui.css" media="all">
    <link rel="stylesheet" href="../css/public.css" media="all">
</head>
<style>
    .layui-form-item {
        width: auto;
        /*padding-right: 10px;*/
        /*padding-left: 0px;*/
        line-height: 38px;

    }

    .layuimini-container .layuimini-form h1 {
        margin-bottom: 1rem;
        padding-left: 1rem;
        border-left: .25rem solid #6bc30d;
        font-weight: 700;
        font-size: 1.5rem;
        line-height: 1.5rem
    }


</style>
<body>
<div class="doc-container" id="doc-container">
    <div class="about-banner" id="container">
        <header class="l-top hasAnim arrow-holder">
            <a data-path-hover="M31.3184948,33.1943359 C36.3357454,28.0664371 44.4728686,28.0690462 49.572124,33.2807584 C54.6360745,38.4563871 54.6061839,46.8782889 49.6566817,51.9369454 L31.318494,69.5197703 L49.6566817,89.71735 C54.6739322,94.8452488 54.6713794,103.161825 49.572124,108.373537 C44.5081735,113.549166 36.267997,113.518616 31.3184948,108.459959 L3.8112137,78.891075 C-1.25273677,73.7154463 -1.2880417,65.3601778 3.8112137,60.1484655 L31.3184948,33.1943359 Z">
                <svg width="0" height="0">
                    <path fill="#fff"
                          d="M58.9103319,3.8342148C63.9275825,-1.29368407,72.0647057,-1.29107495,77.1639611,3.92063726C82.2279116,9.09626594,82.198021,17.5181678,77.2485188,22.5768242C77.2485188,22.5768242,31.318494,69.5197703,31.318494,69.5197703C31.318494,69.5197703,77.2485188,116.462716,77.2485188,116.462716C82.2657693,121.590615,82.2632165,129.907191,77.1639611,135.118903C72.1000106,140.294532,63.8598341,140.263982,58.9103319,135.205326C58.9103319,135.205326,3.8112137,78.891075,3.8112137,78.891075C-1.25273677,73.7154463,-1.2880417,65.3601778,3.8112137,60.1484655C3.8112137,60.1484655,58.9103319,3.8342148,58.9103319,3.8342148C58.9103319,3.8342148,58.9103319,3.8342148,58.9103319,3.8342148"></path>
                </svg>
            </a>
            <a data-path-hover="M31.3184948,33.1943359 C36.3357454,28.0664371 44.4728686,28.0690462 49.572124,33.2807584 C54.6360745,38.4563871 54.6061839,46.8782889 49.6566817,51.9369454 L31.318494,69.5197703 L49.6566817,89.71735 C54.6739322,94.8452488 54.6713794,103.161825 49.572124,108.373537 C44.5081735,113.549166 36.267997,113.518616 31.3184948,108.459959 L3.8112137,78.891075 C-1.25273677,73.7154463 -1.2880417,65.3601778 3.8112137,60.1484655 L31.3184948,33.1943359 Z">
                <svg width="0" height="0">
                    <path fill="#fff"
                          d="M58.9103319,3.8342148 C63.9275825,-1.29368407 72.0647057,-1.29107495 77.1639611,3.92063726 C82.2279116,9.09626594 82.198021,17.5181678 77.2485188,22.5768242 L31.318494,69.5197703 L77.2485188,116.462716 C82.2657693,121.590615 82.2632165,129.907191 77.1639611,135.118903 C72.1000106,140.294532 63.8598341,140.263982 58.9103319,135.205326 L3.8112137,78.891075 C-1.25273677,73.7154463 -1.2880417,65.3601778 3.8112137,60.1484655 L58.9103319,3.8342148 Z"></path>
                </svg>
            </a>
        </header>

        <div class="about-title">
            <h1>用户主页</h1>
            <br>

            <p>一天很短，开心了就笑，不开心了就过会儿再笑。</p>
        </div>

    </div>
    <div class="layuimini-container">
        <div class="layuimini-main">

        </div>
    </div>
    <div class="container-fixed">
        <div class="container-inner">
            <article>
                <section>
                    <div class="layui-form layuimini-form">


                        <div style="padding-left: 577px">
                            <img data-anim="layui-anim-scaleSpring" class="layui-upload layui-anim"
                                 id="id_upload_img"
                                 src="https://www.jq22.com/img/cs/500x500-2.png"
                                 style="border-radius: 5%; width: 10%">
                        </div>

                        <h1>用户信息</h1>
                        <div class="layui-form-item">
                            <label class="layui-form-label"></label>
                            <div class="layui-input-block">
                                <label for="username"></label>
                                <input type="text" name="username" value="" class="layui-input" id="username" readonly
                                       disabled>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label "></label>
                            <div class="layui-input-block">

                                <label>
                                    <input type="number" name="phone" id="phone"
                                           placeholder="请输入手机" value="" class="layui-input" readonly disabled>
                                </label>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label"></label>
                            <div class="layui-input-block">
                                <label>
                                    <input type="email" name="email" id="email" placeholder="请输入邮箱" value=""
                                           class="layui-input" readonly disabled>
                                </label>
                            </div>
                        </div>
                        <div class="layui-form-item layui-form-text">
                            <label class="layui-form-label"></label>
                            <div class="layui-input-block">

                                <label>
                                    <input name="Remarks" id="Remarks" class="layui-input" readonly disabled></input>
                                </label>

                            </div>
                        </div>

                    </div>
                    <h1>链接申请说明</h1>
                    <p>
                        <i class="fa fa-close"></i>经常宕机&nbsp;
                        <i class="fa fa-close"></i>不合法规&nbsp;
                        <i class="fa fa-close"></i>插边球站&nbsp;
                        <i class="fa fa-close"></i>红标报毒&nbsp;
                        <i class="fa fa-check"></i>原创优先&nbsp;
                        <i class="fa fa-check"></i>技术优先
                    </p>
                    <p>
                        如需交换友链，可以在留言区留言<br>
                        名称：ZQ个人博客<br>
                        网址：http://lzqcode.com/<br>
                        图标：image/admin_img.png<br>
                        描述：只要朝着一个方向努力，一切都会变得得心应手
                    </p>
                    <p>
                        申请提交后若无其它原因将在24小时内审核,如超过时间还未通过,请私信我.(各种额外因素)
                    </p>
                </section>
            </article>
            <ul class="link-list">
                <li>
                    <div class="pd-lr-10">
                        <a href="http://www.lzqcode.com" target="_blank">
                            <img src="image/admin_img.png">
                            <h3>ZQ个人博客</h3>
                            <p>只要朝着一个方向努力，一切都会变得得心应手</p>
                        </a>
                    </div>
                </li>
                <li>
                    <div class="pd-lr-10">
                        <a href="http://www.lzqcode.com" target="_blank">
                            <img src="image/admin_img.png">
                            <h3>ZQ个人博客</h3>
                            <p>只要朝着一个方向努力，一切都会变得得心应手</p>
                        </a>
                    </div>
                </li>
                <li>
                    <div class="pd-lr-10">
                        <a href="http://www.lzqcode.com" target="_blank">
                            <img src="image/admin_img.png">
                            <h3>ZQ个人博客</h3>
                            <p>只要朝着一个方向努力，一切都会变得得心应手</p>
                        </a>
                    </div>
                </li>
                <li>
                    <div class="pd-lr-10">
                        <a href="http://www.lzqcode.com" target="_blank">
                            <img src="image/admin_img.png">
                            <h3>ZQ个人博客</h3>
                            <p>只要朝着一个方向努力，一切都会变得得心应手</p>
                        </a>
                    </div>
                </li>
            </ul>
        </div>
    </div>
</div>

<script src="../lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<script src="../js/custom/gloable.js"></script>
<script src="../js/custom/nprogress.js"></script>
<script>NProgress.start();</script>
<script src="../js/custom/blogbenoitboucart.min.js"></script>
<script src="../lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<script src="../js/lay-config.js?v=1.0.4" charset="utf-8"></script>
<script>
    layui.use(['form', 'miniTab', 'upload'], function () {
        const form = layui.form;
        const $ = layui.jquery;
        const pk = localStorage.getItem("pk");
        const headers = {
            'Authorization': localStorage.getItem('token')
        };
        const upload = layui.upload;
        const uploadInst = upload.render({
            elem: '#id_upload_img',
            url: '/user/upload_img/',
            size: 600, //限制文件大小，单位 KB
            before: function (obj) {
                //预读本地文件示例，不支持ie8
                obj.preview(function (index, file, result) {
                    $('#id_upload_img').attr('src', result); //图片链接（base64）
                });
            },
            done: function (res) {
                //如果上传失败
                if (res.status > 0) {
                    return layer.msg('上传失败');
                }
                //上传成功
            },
            error: function () {
                //演示失败状态，并实现重传
                var demoText = $('#demoText');
                demoText.html(
                    '<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>');
                demoText.find('.demo-reload').on('click', function () {
                    uploadInst.upload();
                });
            }
        });

        if (headers.Authorization == null || headers.Authorization == '') {
            window.location.href = "page/login.html";
        }

        // 初始化表单数据
        $.ajax({
            url: 'http://127.0.0.1:8000/user/user/' + pk + '/',
            type: "GET",
            headers: headers,
            success: function (res) {
                if (pk) {
                    $('#username').val(res.data.username);
                    $('#phone').val(res.data.phone);
                    $('#email').val(res.data.email);
                    $('#Remarks').val(res.data.Remarks);
                } else {
                    window.location.href = "page/login.html";
                }
            }
        })
        return false;
    });
</script>
<script src="../js/yanhua.js" charset="utf-8"></script>
<script>
    window.onload = function () {
        NProgress.done();
    };
</script>
</body>
</html>
